import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import get from '@dfeidao/atom-mobile/local/get';
import set from '@dfeidao/atom-mobile/local/set';
import nodejs from '@dfeidao/atom-mobile/msg/nodejs';
import render from '@dfeidao/atom-mobile/render/render';
export default async function a003(fd: IFeidaoAiMobile, args: string, class_id: string, class_name: string) {
	// 选择年级
	const vaue = get(fd, 'vaue');
	const id = class_id || args;
	if (vaue === id) {
		set(fd, 'vaue', id);
		return;
	}
	const params = get(fd, 'params') as { teacher_no: string };
	const class_res = get(fd, 'class_res');
	const d = await nodejs('app-home/s002', {
		params: {
			productid: get(fd, 'productid'),
			teacher_no: params.teacher_no,
			class_id: id,
			class_res
		}
	});
	set(fd, 'vaue', id);
	render(fd, { data: { class_res, d, vaue: id, vaue_name: class_name } });
}
